﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ValuationBLL
{
    public class UsersBll
    {
        #region 登录方法
        /// <summary>
        /// 登录方法
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="name"></param>
        /// <param name="pwd"></param>
        /// <returns></returns>
        public T Login<T>(string phone, string pwd)
        {
            return BllFactory.NewUsersDAL().Login<T>(phone, pwd);
        }
        #endregion

        #region 查询单个实体
        /// <summary>
        /// 查询单个实体
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public List<T> GetList<T>()
        {
            return BllFactory.NewUsersDAL().GetList<T>();
        }
        #endregion

        #region 根据id查询单个实体
        /// <summary>
        /// 根据id查询单个实体
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public T GetEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().GetEntity<T>(id);
        }
        #endregion

        #region 单个实体添加，删除，修改
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool AddEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().AddEntity<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DelEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().DelEntity<T>(id);
        }
        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UpdEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().UpdEntity<T>(t);
        }
        #endregion

        #region 系统管理权限列表显示
        /// <summary>
        /// 系统管理权限列表
        /// </summary>
        /// <returns></returns>
        public List<SysAuthorityAndRoles> Authority()
        {
            return BllFactory.NewUsersDAL().Authority();
        }
        #endregion
        
        #region 部门管理
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DAddEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().DAddEntity<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DDelEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().DDelEntity<T>(id);
        }

        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DUpdEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().DUpdEntity<T>(t);
        }
        #endregion

        #region 用户管理
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UAddEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().UAddEntity<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UDelEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().UDelEntity<T>(id);
        }

        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UUpdEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().UUpdEntity<T>(t);
        }
        #endregion

        #region 字典管理
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DicAddEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().DicAddEntity<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DicDelEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().DicDelEntity<T>(id);
        }

        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DicUpdEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().DicUpdEntity<T>(t);
        }
        #endregion

        #region 区位勘查
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool AddEAFloors<T>(T t)
        {
            return BllFactory.NewUsersDAL().AddEAFloors<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DelEAFloors<T>(int id)
        {
            return BllFactory.NewUsersDAL().DelEAFloors<T>(id);
        }

        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UpdEAFloors<T>(T t)
        {
            return BllFactory.NewUsersDAL().UpdEAFloors<T>(t);
        }
        #endregion

        #region 小区勘查
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool InsertEAVillage<T>(T t)
        {
            return BllFactory.NewUsersDAL().InsertEAVillage<T>(t);
        }
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool DeleteEAVillage<T>(int id)
        {
            return BllFactory.NewUsersDAL().DeleteEAVillage<T>(id);
        }

        /// <summary>
        /// 单个实体修改
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool UpdateEAVillage<T>(T t)
        {
            return BllFactory.NewUsersDAL().UpdateEAVillage<T>(t);
        }
        #endregion

        #region 建筑勘查
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool InsertEAFloors<T>(T t)
        {
            return BllFactory.NewUsersDAL().InsertEAFloors<T>(t);
        }
       
        #endregion

        #region 室内勘查
        /// <summary>
        /// 单个实体添加
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool InsertEAIndoor<T>(T t)
        {
            return BllFactory.NewUsersDAL().InsertEAIndoor<T>(t);
        }

        #endregion

        #region  室内照片
        /// <summary>
        /// 单个实体删除
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool PDeleteEntity<T>(int id)
        {
            return BllFactory.NewUsersDAL().PDeleteEntity<T>(id);
        }
        /// <summary>
        /// 添加照片
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public bool PInsertEntity<T>(T t)
        {
            return BllFactory.NewUsersDAL().PInsertEntity<T>(t);
        }
        #endregion
       
    }
}

